package pl.edu.agh.mguesser.test;

import com.google.common.io.Resources;
import java.net.URISyntaxException;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * @author keiran
 */
public abstract class PathUtils {
    
    public static final Path FILE;
    public static final Path DIRECTORY;
    
    static {
        FILE = resourceAsPath("emptyfile.txt");
        DIRECTORY = resourceAsPath("conf");
    }
    
    public static Path resourceAsPath(String resource) {
        try {
            return Paths.get(Resources.getResource(resource).toURI());
            
        } catch(URISyntaxException ex) {
            throw new IllegalArgumentException(ex);
            
        }
    }
    
}
